.class public Lcom/ninesky/browser/readinglist/ReadingListActivity;
.super Landroid/app/Activity;


# instance fields
.field private final a:Z

.field private b:Landroid/widget/ListView;

.field private c:Lcom/ninesky/browser/readinglist/h;

.field private d:Landroid/widget/Button;

.field private e:Landroid/widget/Button;

.field private f:Lcom/ninesky/browser/readinglist/i;

.field private g:Landroid/database/Cursor;


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->a:Z

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/readinglist/ReadingListActivity;)Lcom/ninesky/browser/readinglist/i;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->f:Lcom/ninesky/browser/readinglist/i;

    return-object v0
.end method


# virtual methods
.method final a()V
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->getCount()I

    move-result v0

    if-lez v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->e:Landroid/widget/Button;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setEnabled(Z)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->e:Landroid/widget/Button;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setEnabled(Z)V

    goto :goto_0
.end method

.method final b()V
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->isClosed()Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->f:Lcom/ninesky/browser/readinglist/i;

    invoke-virtual {v0}, Lcom/ninesky/browser/readinglist/i;->a()Landroid/database/Cursor;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->c:Lcom/ninesky/browser/readinglist/h;

    iget-object v1, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/readinglist/h;->changeCursor(Landroid/database/Cursor;)V

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 6

    const/4 v5, 0x5

    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f03001c

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/readinglist/ReadingListActivity;->setContentView(I)V

    new-instance v0, Lcom/ninesky/browser/readinglist/i;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/readinglist/i;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->f:Lcom/ninesky/browser/readinglist/i;

    const v0, 0x7f0c004c

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/readinglist/ReadingListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ListView;

    iput-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->b:Landroid/widget/ListView;

    const v0, 0x7f0c0012

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/readinglist/ReadingListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->d:Landroid/widget/Button;

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->d:Landroid/widget/Button;

    new-instance v1, Lcom/ninesky/browser/readinglist/e;

    invoke-direct {v1, p0}, Lcom/ninesky/browser/readinglist/e;-><init>(Lcom/ninesky/browser/readinglist/ReadingListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c004d

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/readinglist/ReadingListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->e:Landroid/widget/Button;

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->e:Landroid/widget/Button;

    new-instance v1, Lcom/ninesky/browser/readinglist/d;

    invoke-direct {v1, p0}, Lcom/ninesky/browser/readinglist/d;-><init>(Lcom/ninesky/browser/readinglist/ReadingListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->b:Landroid/widget/ListView;

    new-instance v1, Lcom/ninesky/browser/readinglist/g;

    invoke-direct {v1, p0}, Lcom/ninesky/browser/readinglist/g;-><init>(Lcom/ninesky/browser/readinglist/ReadingListActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->f:Lcom/ninesky/browser/readinglist/i;

    invoke-virtual {v0}, Lcom/ninesky/browser/readinglist/i;->a()Landroid/database/Cursor;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    new-instance v0, Lcom/ninesky/browser/readinglist/h;

    iget-object v3, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    new-array v4, v5, [Ljava/lang/String;

    const/4 v1, 0x0

    const-string v2, "_id"

    aput-object v2, v4, v1

    const/4 v1, 0x1

    const-string v2, "title"

    aput-object v2, v4, v1

    const/4 v1, 0x2

    const-string v2, "url"

    aput-object v2, v4, v1

    const/4 v1, 0x3

    const-string v2, "date"

    aput-object v2, v4, v1

    const/4 v1, 0x4

    const-string v2, "done"

    aput-object v2, v4, v1

    new-array v5, v5, [I

    fill-array-data v5, :array_0

    move-object v1, p0

    move-object v2, p0

    invoke-direct/range {v0 .. v5}, Lcom/ninesky/browser/readinglist/h;-><init>(Lcom/ninesky/browser/readinglist/ReadingListActivity;Landroid/content/Context;Landroid/database/Cursor;[Ljava/lang/String;[I)V

    iput-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->c:Lcom/ninesky/browser/readinglist/h;

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->b:Landroid/widget/ListView;

    iget-object v1, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->c:Lcom/ninesky/browser/readinglist/h;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/readinglist/ReadingListActivity;->a()V

    return-void

    :array_0
    .array-data 0x4
        0x46t 0x0t 0xct 0x7ft
        0x49t 0x0t 0xct 0x7ft
        0x47t 0x0t 0xct 0x7ft
        0x4at 0x0t 0xct 0x7ft
        0x48t 0x0t 0xct 0x7ft
    .end array-data
.end method

.method protected onCreateDialog(I)Landroid/app/Dialog;
    .locals 3

    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    packed-switch p1, :pswitch_data_0

    const/4 v0, 0x0

    :goto_0
    return-object v0

    :pswitch_0
    const v1, 0x1080040

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setIcon(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f070035

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f070036

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x1040013

    new-instance v2, Lcom/ninesky/browser/readinglist/f;

    invoke-direct {v2, p0}, Lcom/ninesky/browser/readinglist/f;-><init>(Lcom/ninesky/browser/readinglist/ReadingListActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x1040009

    new-instance v2, Lcom/ninesky/browser/readinglist/c;

    invoke-direct {v2, p0}, Lcom/ninesky/browser/readinglist/c;-><init>(Lcom/ninesky/browser/readinglist/ReadingListActivity;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    goto :goto_0

    :pswitch_data_0
    .packed-switch 0xc9
        :pswitch_0
    .end packed-switch
.end method

.method protected onDestroy()V
    .locals 1

    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->isClosed()Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/readinglist/ReadingListActivity;->g:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    :cond_0
    return-void
.end method

.method protected onPause()V
    .locals 0

    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    invoke-static {p0}, Lcom/mobclick/android/c;->a(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 0

    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    invoke-static {p0}, Lcom/mobclick/android/c;->b(Landroid/content/Context;)V

    return-void
.end method
